package com.jydw.da.frame.utils;

import java.math.BigInteger;

public class Test {
    static int maxPaddingSize = 4;
    public static void main(String[] args) {
//        long shardingValue = 12345678910L;
        long shardingValue = 100000000222L;
        int startOffset = 2;
        int stopOffset = 4;


        System.out.println(new BigInteger(Long.toString(shardingValue).substring(startOffset, Long.toString(shardingValue).length() - stopOffset)));

        System.out.println(fillZero("5"));

        System.out.println("fbdb3e18-a8ef-4fb3-9183-dffd60bd0984".replace("-",""));
    }

    private static String fillZero(final String value) {
        return String.format("%0" + maxPaddingSize + "d", Integer.parseInt(value));
    }
}
